libxl: Spice streaming video setting support for upstream qemu
authorFabio Fantoni <fabio.fantoni@m2r.biz>
Tue, 20 Jan 2015 10:33:17 +0000 (11:33 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 27 Jan 2015 16:41:31 +0000 (16:41 +0000)
Usage:
spice_streaming_video=[filter|all|off]

Specifies what streaming video setting is to be used by spice (if
given),
otherwise the qemu default will be used.

Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz>
Acked-by: Wei Liu <wei.liu2@citrix.com>
docs/man/xl.cfg.pod.5
tools/libxl/libxl.h
tools/libxl/libxl_dm.c
tools/libxl/libxl_types.idl
tools/libxl/xl_cmdimpl.c

index 0c2cbacc5dd32630e47150323bb27017cdf5b880..408653f514c908cf4ee8593b01f5d80c06e3ca67 100644 (file)
@@ -1433,6 +1433,11 @@ Specifies what image compression is to be used by spice (if given), otherwise
 the qemu default will be used. Please see documentations of your current qemu
 version for details.
 
+=item B<spice_streaming_video=[filter|all|off]>
+
+Specifies what streaming video setting is to be used by spice (if given),
+otherwise the qemu default will be used.
+
 =back
 
 =head3 Miscellaneous Emulated Hardware
index b8e0b675ed0863653cdcba5b1ff969bfe26b0111..c219f59c4756344e098506b8e779adf1edda678e 100644 (file)
@@ -538,6 +538,17 @@ typedef struct libxl__ctx libxl_ctx;
  */
 #define LIBXL_HAVE_SPICE_IMAGECOMPRESSION 1
 
+/*
+ * LIBXL_HAVE_SPICE_STREAMINGVIDEO
+ *
+ * If defined, then the libxl_spice_info structure will contain a string type
+ * field: streaming_video. This value defines what Spice streaming video setting
+ * is used.
+ *
+ * If this is not defined, the Spice streaming video setting support is ignored.
+ */
+#define LIBXL_HAVE_SPICE_STREAMINGVIDEO 1
+
 /*
  * LIBXL_HAVE_DOMAIN_CREATE_RESTORE_PARAMS 1
  *
index 40c86499e4a213af69512f9a32c25aa06c05ff1f..d8d6f0c9136f376c5329c06cbe7050801b3468b8 100644 (file)
@@ -402,6 +402,10 @@ static char *dm_spice_options(libxl__gc *gc,
         opt = libxl__sprintf(gc, "%s,image-compression=%s", opt,
                              spice->image_compression);
 
+    if (spice->streaming_video)
+        opt = libxl__sprintf(gc, "%s,streaming-video=%s", opt,
+                             spice->streaming_video);
+
     return opt;
 }
 
index 052ded997eaa9600f46deb7f2b652de11f5986d3..02be4664c6b9ac9b6a3a7ae733c49a81abf77f93 100644 (file)
@@ -242,6 +242,7 @@ libxl_spice_info = Struct("spice_info", [
     ("clipboard_sharing", libxl_defbool),
     ("usbredirection", integer),
     ("image_compression", string),
+    ("streaming_video", string),
     ])
 
 libxl_sdl_info = Struct("sdl_info", [
index 00aa69dff50e8b4e3377613539e07a21d7b62308..b7eac2940cec7a328a8c9e916dee9b16919ee05c 100644 (file)
@@ -1950,6 +1950,8 @@ skip_vfb:
             b_info->u.hvm.spice.usbredirection = l;
         xlu_cfg_replace_string (config, "spice_image_compression",
                                 &b_info->u.hvm.spice.image_compression, 0);
+        xlu_cfg_replace_string (config, "spice_streaming_video",
+                                &b_info->u.hvm.spice.streaming_video, 0);
         xlu_cfg_get_defbool(config, "nographic", &b_info->u.hvm.nographic, 0);
         xlu_cfg_get_defbool(config, "gfx_passthru",
                             &b_info->u.hvm.gfx_passthru, 0);